from alg import Solution

test_cases = [
    {"input": "abc", "expected": 3},
    {"input": "aaa", "expected": 6},
    # 这里可以添加更多测试用例
]

solution = Solution()
for i, test_case in enumerate(test_cases):
    result = solution.countSubstrings(test_case["input"])
    print(f"测试用例 {i+1}: 输入 '{test_case['input']}'")
    print(
        f"预期: {test_case['expected']}, 实际: {result}",
        "✓" if result == test_case["expected"] else "✗",
    )
    print()
